}
static void
-add_window_frame_style_class (GtkStyleContext *context)
+style_context_save_to_decoration (GtkStyleContext *context)
{
+ gtk_style_context_save (context);
+
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BACKGROUND);
gtk_style_context_add_class (context, "window-frame");
}
state = _gtk_widget_get_state_flags (GTK_WIDGET (window));
context = _gtk_widget_get_style_context (GTK_WIDGET (window));
- gtk_style_context_save (context);
- add_window_frame_style_class (context);
+ style_context_save_to_decoration (context);
/* We don't want windows to jump as they go to backdrop,
* therefore we use the maximum of the decoration sizes
state = _gtk_widget_get_state_flags (widget);
context = _gtk_widget_get_style_context (widget);
- gtk_style_context_save (context);
- add_window_frame_style_class (context);
+ style_context_save_to_decoration (context);
gtk_style_context_set_state (context, state);
gtk_style_context_get_margin (context, state, &border);
gtk_widget_style_get (widget,
{
cairo_rectangle_int_t rect;
- gtk_style_context_save (context);
- add_window_frame_style_class (context);
+ style_context_save_to_decoration (context);
corner_rect (&rect, _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS));
rect.x = extents->x;
!priv->fullscreen &&
!priv->maximized)
{
- gtk_style_context_save (context);
-
- add_window_frame_style_class (context);
+ style_context_save_to_decoration (context);
if (priv->use_client_shadow)
{